#ifndef ADDBOOK_H
#define ADDBOOK_H

#include <QWidget>
#include <QLineEdit>
#include <QMessageBox>

#include "keyboard.h"
#include "sqlite.h"

namespace Ui {
class AddBook;
}

class AddBook : public QWidget
{
    Q_OBJECT

    enum Choose_t{
        NAME,
        PIC,
        NUM,
        SELL,
    };
public:
    explicit AddBook(QWidget *parent = nullptr);
    ~AddBook();

    KeyBoard *key;
    Choose_t choose = NAME;
    bool eventFilter(QObject *watched, QEvent *event);
    void mouseReleaseEvent(QMouseEvent *);
public slots:
    void deleteBtn_click();
    void keyPress(QString ch);
private slots:
    void on_pushButton_clicked();

    void on_pushButton_2_clicked();

signals:
    void sigAddBook();
private:
    Ui::AddBook *ui;
};

#endif // ADDBOOK_H
